//安卓系统时请打开下面注释，苹果系统时注释，插件不兼容
import 'package:flutter/services.dart';
import 'package:install_plugin/install_plugin.dart';

class VersionUtils {
  static const MethodChannel _kChannel = MethodChannel('version');

  /// 应用安装
  static void install(String path) {
    
    InstallPlugin.installApk(path, "com.example.magic_car")
      .then((result) {
    print('install apk $result');
  }).catchError((error) {
    print('install apk error: $error');
  });
   _kChannel.invokeMethod<void>('install', {'path': path});
  }

  /// AppStore跳转
  static void jumpAppStore() {
    _kChannel.invokeMethod<void>('jumpAppStore');
  }
}